using System;
using Castle.Core.Interceptor;

namespace Project.Library.Core.AOP
{
    public class InterceptorHelper
    {
        /// <summary>
        /// Gets the name of the method to proceed.
        /// </summary>
        /// <param name="invocation">The intercepted method.</param>
        /// <returns></returns>
        public static string GetMethodName(IInvocation invocation)
        {
            return String.Format("{0}.{1}({2})",
                                 invocation.TargetType.FullName,
                                 invocation.Method.Name,
                                 String.Join(",", (string[])invocation.Arguments));
        }
    }
}